<template>
	<view>
		<view class="jourList">
			<view class="item" v-for="(item,index) in selsectlist" :key="index"
				@tap="$navTo('/pages/news/news?id='+item.id)">
				<image :src="$baseUrl(item.newimage) " mode=""></image>
				<view class="right">
					<view class="name">
						{{item.title}}
					</view>
					<view class="time">
						{{item.publishtime}}
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				selsectlist:[]
			}
		},
		onShow() {
			this.getselection()
		},
		methods: {
			getselection() {
				this.$request('/addons/qingdong/news/getSelectList', 'GET').then(res => {
					console.log(res)
					this.selsectlist = res.data.data
				})
			},
		}
	}
</script>

<style lang="scss">
	.jourList {
		width: 100%;
		background: #fff;
		border-radius: 16rpx;
		padding: 15rpx;
		box-sizing: border-box;

		.title {
			width: 100%;
			display: flex;
			font-weight: bold;
			align-items: center;
			justify-content: space-between;

			.cha {
				border-radius: 10rpx;
				padding: 10rpx 20rpx;
				font-weight: 400;
				font-size: 20rpx;
				color: #333333;
				background: #f0efef;
			}

			margin-bottom: 30rpx;
		}

		.item {
			margin-bottom: 20rpx;
			width: 100%;
			display: flex;
			align-items: center;

			image {
				width: 218rpx;
				height: 132rpx;
				border-radius: 10rpx;
				background: #ccc;
			}

			.right {
				padding-left: 20rpx;
				box-sizing: border-box;

				.name {
					font-weight: 400;
					font-size: 24rpx;
					color: #333333;
				}

				.time {
					margin-top: 40rpx;
					font-weight: 400;
					font-size: 20rpx;
					color: #999999;
				}
			}
		}
	}
</style>